Repository navigation
Conversation
…arrays BREAKING CHANGE: use separate output arrays To migrate, users should replace the `out` and `strideOut` arguments with a single-element `sum` array and a single-element `count` array (an `Int32Array`).
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
3 of 16 tasks
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Progresses #16965.
Description
This pull request:
blas/ext/base/dnannsumkbnto write the sum and the number of non-NaN elements to separate single-element arrays rather than a packed two-elementoutarray, following the convention used bylapack/base/dladivandlapack/base/dlassq.dnannsumkbn( N, x, strideX, sum, count )anddnannsumkbn.ndarray( N, x, strideX, offsetX, sum, offsetSum, count, offsetCount ), wheresumis aFloat64Arrayandcountis anInt32Array, each containing a single element. The functions now returnvoid.blas/ext/basenamespace declarations accordingly.blas/ext/base/dnannsumto call the new signature. Its own API is unchanged.The C APIs are unchanged, as they already return the sum and write the count through a pointer.
The underlying algorithm is unchanged, and all previously expected values are retained in the tests.
Related Issues
This pull request has the following related issues:
Questions
The C APIs already use a pointer for the count (
CBLAS_INT *n), so I left them as they are. Should they instead change tovoidwith two output pointers (double *sum,CBLAS_INT *count);?Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
I used claude code for refactored tests generation, reviewed them myself;
@stdlib-js/reviewers